package com.zijin.entity;

import lombok.Data;

@Data
public class Result {

    private Integer code;

    private String msg;

    private Object data;

    public static Result success(String msg, Object data) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg(msg);
        result.setData(data);
        return result;
    }

    public static Result error(String msg, Object data) {
        Result result = new Result();
        result.setCode(500);
        result.setMsg(msg);
        result.setData(data);
        return result;
    }

}
